<?php
session_start();
require('dbconnection.php');
db_connect();


  $picture = $_POST['picture'];
  $username = $_SESSION['uname'];

  $query= "insert into passes(user,picture) values ('$username','$picture')";
  $result = mysql_query($query);

  if (!$result)
     throw new Exception("There is no result");    


?>
